/**
 * 在主框架内显示
 * 路由配置说明
 * {
      path: '/dir-console-info',    // 页面地址（唯一）
      name: 'dir-console-info',     // 页面名称（唯一）
      hidden: false,              // 隐藏（不展示在侧边栏菜单）
      meta: {
          title: '用户管理',       // 页面标题
          icon: 'yonghuguanli',  // 页面图标
          cache: true,          // 页面是否进行缓存 默认true
          link: false,           // 页面是否是外链 默认false
          frameSrc: false,       // 页面是否是内嵌 默认false
          requiresAuth: true,   // 页面是否是需要登录 默认true
          perms: [               // 页面的操作的权限列表
              'sys:users:list',   // 查询
              'sys:users:create', // 增加
              'sys:users:update', // 更新
              'sys:users:delete', // 删除
          ],
      },
      component: () => import('@/views/sys/users/dir-users-info.vue'),// 懒加载页面组件
   }
 *
 */

const frameControl = [
    {
        path: '/owner',
        redirect: { name: 'owner' },
        component: () => import('@/layout/control.vue'),
        children: [
            {
                path: '/owner/owner-space',
                name: 'OwnerSpace',
                meta: {
                    title: '机主首页',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/owner/owner-space',
                        name: 'OwnerSpace',
                        meta: {
                            cache: true,
                            title: '机主首页',
                            icon: 'icon_menu_ownerIndex',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/ownerSpace/index.vue'),
                    },
                    {
                        path: '/owner/points',
                        name: 'points',
                        hidden: true,
                        meta: {
                            cache: true,
                            title: '积分',
                            icon: 'icon_menu_ownerIndex',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/ownerSpace/points.vue'),
                    }
                ]
            },
            {
                path: '/owner/machine',
                name: 'Machine',
                meta: {
                    title: '我的机器',
                    requiresAuth: true,
                },
                children: [
                    {
                        path: '/owner/machine',
                        name: 'Machine',
                        meta: {
                            cache: true,
                            title: '我的机器',
                            icon: 'icon_menu_ownerMachine',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/machine/index.vue')
                    },
                    {
                        path: '/owner/machine-edit',
                        name: 'MachineEdit',
                        hidden: true,
                        meta: {
                            title: '编辑机器',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/machine/machineEdit.vue')
                    },
                    {
                        path: '/owner/create-instance',
                        name: 'CreateInstance',
                        hidden: true,
                        meta: {
                            title: '创建实例',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/machine/createInstance.vue')
                    }
                ]
            },
            {
                path: '/owner/rental-records',
                name: 'RentalRecords',
                meta: {
                    title: '出租记录',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/owner/rental-records',
                        name: 'RentalRecords',
                        meta: {
                            cache: true,
                            title: '出租记录',
                            icon: 'icon_menu_ownerRentalRecords',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/rentalRecords/index.vue')
                    }
                ]
            },
            {
                path: '/owner/fund-records',
                name: 'FundRecords',
                meta: {
                    title: '资金记录',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/owner/fund-records',
                        name: 'FundRecords',
                        meta: {
                            cache: true,
                            title: '资金记录',
                            icon: 'icon_menu_ownerFundRecords',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/fundRecords/index.vue')
                    },
                    {
                        path: '/owner/cost-account',
                        name: 'OwnerCostAccount',
                        hidden: true,
                        meta: {
                            cache: true,
                            title: '账户管理',
                            hidden: true,
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/fundRecords/costAccount.vue')
                    },
                    {
                        path: '/owner/apply-withdrawal',
                        name: 'OwnerApplyWithdrawal',
                        hidden: true,
                        meta: {
                            title: '申请提现',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/fundRecords/applyWithdrawal.vue')
                    },
                ]
            },
            {
                path: '/owner/data-statistics',
                name: 'DataStatistics',
                meta: {
                    title: '数据统计',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/owner/data-statistics',
                        name: 'DataStatistics',
                        meta: {
                            title: '数据统计',
                            icon: 'icon_menu_ownerDataStatistics',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/dataStatistics/index.vue')
                    },
                ]
            },
            {
                path: '/owner/policy',
                name: 'Policy',
                meta: {
                    title: '机主政策',
                    requiresAuth: true
                },
                children: [
                    {
                        path: '/owner/policy',
                        name: 'Policy',
                        meta: {
                            title: '机主政策',
                            icon: 'icon_menu_ownerPolicy',
                            requiresAuth: true,
                        },
                        component: () => import('@/views/owner/policy/index.vue')
                    }
                ]
            }
        ]
    }
]

export default frameControl
